package io.renren.modules.brdy7.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.brdy7.dao.B108BasicLivingAllowancesRateDao;
import io.renren.modules.brdy7.entity.B108BasicLivingAllowancesRateEntity;
import io.renren.modules.brdy7.service.B108BasicLivingAllowancesRateService;


@Service("b108BasicLivingAllowancesRateService")
public class B108BasicLivingAllowancesRateServiceImpl extends ServiceImpl<B108BasicLivingAllowancesRateDao, B108BasicLivingAllowancesRateEntity> implements B108BasicLivingAllowancesRateService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String createby=params.get("createby").toString();
        IPage<B108BasicLivingAllowancesRateEntity> page = this.page(
                new Query<B108BasicLivingAllowancesRateEntity>().getPage(params),
                new QueryWrapper<B108BasicLivingAllowancesRateEntity>().eq("creatby",createby)
        );

        return new PageUtils(page);
    }
    public PageUtils queryPageforDistrict(Map<String, Object> params) {
        String typecode=params.get("typecode").toString();
        System.out.println("typecode is "+typecode+"**********");
        IPage<B108BasicLivingAllowancesRateEntity> page = this.page(
                new Query<B108BasicLivingAllowancesRateEntity>().getPage(params),
                new QueryWrapper<B108BasicLivingAllowancesRateEntity>().like("type_code", typecode)
        );
        return new PageUtils(page);
    }
}
